MyProgressProc
Your progress function should have the following form:
pascal OSErr MyProgressProc (short message, Fixed completeness, long refcon);
message
- Indicates why the Image Compression Manager called your function. The following values are valid:
codecProgressOpen
- Indicates the start of a long operation. This is always the first message sent to your function. Your function can use this message to trigger the display of your progress window.
codecProgressUpdatePercent
- Passes completion information to your function. The Image Compression Manager repeatedly sends this message to your function. The
completeness
parameter indicates the relative completion of the operation. You can use this value to update your progress window.codecProgressClose
- Indicates the end of a long operation. This is always the
last message sent to your function. Your function can use this message as an indication to remove its progress window.completeness
- Contains a fixed-point value indicating how far the operation has progressed. Its value is always between 0.0 and 1.0. This parameter is valid only when the message field is set to
codecProgressUpdatePercent
.refcon
- Contains a reference constant value for use by your progress function. Your application specifies the value of this reference constant in the progress function structure you pass to the Image Compression Manager.
DESCRIPTION
The following functions have parameters that allow you to provide application-defined progress functions:FCompressImage
,FDecompressImage
,TrimImage
,FCompressPicture
,FCompressPictureFile
,DrawPictureFile
,DrawTrimmedPicture
,DrawTrimmedPictureFile
,MakeThumbNailFromPicture
,MakeThumbnailFromPictureFile
,MakeThumbnailFromPixMap
,SetCompressedPixMapInfo
, andGetCompressedPixMapInfo
. If you pass a value of -1 in theprogressProc
parameter of any of these functions, you obtain a standard progress function.RESULT CODES
noErr 0 No error paramErr -50 Invalid parameter specified codecAbortErr -8967 Operation aborted by the progress function